package demo01;

import java.util.Scanner;
//输入一个数字，判断它是质数还是合数
public class homework08 {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个数字:");
        int a1=sc.nextInt();
        int a2=0;
        for(int i=1;i<=a1;i++){
            if(a1%i==0){
                a2++;
            }
        }
        if(a2==2){
            System.out.println(a1+"是质数");
        }else{
            System.out.println(a1+"是合数");
        }
    }
}